

<!DOCTYPE html>
<html class="u-forget">

<head>
    <meta charset="UTF-8">
    <title>创建数据库 - 115CMS综合内容管理系统</title>
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" href="/public/admin/lib/layui/css/layui.css">
    <script src="/public/js/jquery-3.4.1.min.js"></script>
</head>
<style>
.u-forget .title_forget{line-height: 40px; margin: 0px auto; height: 41px; margin-top: 109px; overflow: hidden; text-align: center; font-size: 26px; color: #333;}
.u-forget .step{margin: 0px auto; height: 70px; margin-top: 108px; margin-bottom: 60px; overflow: hidden; background: url('../install/img/cjsj.jpg') no-repeat; background-size: 100% auto;}
.u-forget .forget_next{width: 200px; margin-top: 22px; background: #5298ff;}
.p{font-size: 15px; line-height: 30px; color: #333; padding: 20px; border: 10px solid #5298ff; border-radius: 5px;}
.layui-container{width: 750px;}
.layui-form-pane .layui-form-label {width: 150px;}
.layui-form-pane .layui-input-block {margin-left: 150px;}
</style>
<body>
    <div class="layui-container">
        <h3 class="title_forget">创建数据库 - 115CMS综合内容管理系统</h3>
        <div class="step visible-lg visible-md"></div>
        <div class="p">
            <form id="keydb" class="layui-form layui-form-pane" action="./index.php?c=success" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库类型</label>
                    <div class="layui-input-block">
                        <input type="text" name="DB_TYPE" value="mysql" disabled="disabled" class="layui-input">
                    </div>
                </div>
                <input type="text" style="display:none;" name="www" id="www">
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库服务器</label>
                    <div class="layui-input-block">
                        <input type="text" name="DB_HOST" value="127.0.0.1" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库端口</label>
                    <div class="layui-input-block">
                        <input type="text" name="DB_PORT" value="3306" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库名</label>
                    <div class="layui-input-block">
                        <input type="text" type="text" name="DB_NAME" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库用户名</label>
                    <div class="layui-input-block">
                        <input type="text" name="DB_USER" value="root" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库密码</label>
                    <div class="layui-input-block">
                        <input type="text" name="DB_PWD" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数据库前缀</label>
                    <div class="layui-input-block">
                        <input type="text" name="DB_PREFIX" value="my_" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <br>
                <br>
                <div align="center">
                    <a href="./index.php?c=test">
                        <div class="forget_next layui-btn">上一步</div>
                    </a>
                    <a onclick="insert()" href="javascript:;">
                        <div class="forget_next layui-btn">下一步</div>
                    </a>
                    <div class="inout2" style="display:none;" id="bky">
                        <input type="submit" onclick="insert()" lay-submit lay-filter="formDemo" class="forget_next layui-btn" value="点击安装">
                    </div>
                </div>
            </form>
		</div>
    </div>
</body>
</html>
  <script type="text/javascript">    
    var www = window.location.host;  
    document.getElementById('www').value = www;  
    function insert() {
      document.getElementById("bky").style.display = "inline";
      $.ajax({
        type: "POST", url: "<?php echo $url; ?>/index/api/keywww.html" ,
        data: $('#keydb').serialize(),
      });
    }
  </script> 